package com.bianguo.android.httplibrary;

import com.bianguo.android.httplibrary.listener.IJsonDataListener;

public class HttpUtil {

    public static <T, M> void sendJsonRequest(String url, T requestData, Class<M> response, IJsonDataListener listener) {
        JsonHttpRequest request = new JsonHttpRequest();
        JsonCallBackListener callBackListener = new JsonCallBackListener(response, listener);
        HttpTask task = new HttpTask(url, requestData, request, callBackListener);
        ThreadPoolManager.getInstance().addTask(task);
    }
}
